<div class="dp100">
	<h2 class="sepH_b">So sánh nhân sự ngành - quý <?php echo $c_quarter ?>/<?php echo $c_year-1 ?> và quý <?php echo $c_quarter ?>/<?php echo $c_year ?></h2>
	
	<table cellspacing="0" cellpadding="0" border="0" class="table_a formEl_a smpl_tbl">
		<thead>			
			<tr>			
				<th align="center" width="20%"><?php __(''); ?></th>
				<th align="center" width="20%"><?php __('Khu vực'); ?></th>
				<th align="center">quý <?php echo $c_quarter ?>/<?php echo $c_year-1; ?></th>
				<th align="center">quý <?php echo $c_quarter ?>/<?php echo $c_year; ?></th>                               
			</tr>
		</thead>
		<tbody>			
			<?php foreach($areas as $b => $item) { if($b != count($areas)-1) { ?>
				<tr>
					<?php if($b == 0) { ?><td rowspan="8">Tỉ lệ BS/Dân</td><?php } ?>
					<td><strong><?php echo $item["name"] ?></strong></td>
					
					<td align="right">
						
							1/<?php echo $item['old']["doctor_population"] ?>
					</td>                                        
                                        <td align="right">
						
							1/<?php echo $item["doctor_population"] ?>
					</td>
                                       
				</tr>
			<?php } else { ?>
                            <tr>
					<td><strong>Trung bình</strong></td>
					
					<td align="right">
						
							<strong>1/<?php echo $item['old']["doctor_population"] ?></strong>
					</td>
                                        
					<td align="right">
						
							<strong>1/<?php echo $item["doctor_population"] ?></strong>
					</td>
				</tr>                        
                        <?php }} ?>
				<tr>
					<td><strong>Ít nhất</strong></td>
					
					<td align="right">
						
							<strong>1/<?php echo $maxmin['old']['min']['doctors'] ? round($maxmin['old']['min']['population']/$maxmin['old']['min']['doctors'], 0) : 0; ?> (<?php echo $maxmin['old']['min']['city']['City']['name'] ?>)</strong>
					</td>
                                        
					<td align="right">
						
							<strong>1/<?php echo $maxmin['min']['doctors'] ? round($maxmin['min']['population']/$maxmin['min']['doctors'], 0) : 0; ?> (<?php echo $maxmin['min']['city']['City']['name'] ?>)</strong>
					</td>
				</tr>
				<tr>
					<td><strong>Nhiều nhất</strong></td>
					
					<td align="right">
						
							<strong>1/<?php echo $maxmin['old']['max']['doctors'] ? round($maxmin['old']['max']['population']/$maxmin['old']['max']['doctors'], 0) : 0; ?> (<?php echo $maxmin['old']['max']['city']['City']['name'] ?>)</strong>
					</td>
                                        
					<td align="right">
						
							<strong>1/<?php echo $maxmin['max']['doctors'] ? round($maxmin['max']['population']/$maxmin['max']['doctors'], 0) : 0; ?> (<?php echo $maxmin['max']['city']['City']['name'] ?>)</strong>
					</td>
				</tr>
			<?php foreach($areas as $b => $item) { if($b != count($areas)-1) { ?>
				<tr>
					<?php if($b == 0) { ?><td rowspan="6">Tỉ lệ BS/HS</td><?php } ?>
					<td><strong><?php echo $item["name"] ?></strong></td>
					
					<td align="right">
						
							1/<?php echo $item['old']["doctor_student"] ?>
					</td>                                        
                                        <td align="right">
						
							1/<?php echo $item["doctor_student"] ?>
					</td>
                                       
				</tr>
			<?php } else { ?>
                            <tr>
					<td><strong>Trung bình</strong></td>
					
					<td align="right">
						
							<strong>1/<?php echo $item['old']["doctor_student"] ?></strong>
					</td>
                                        
					<td align="right">
						
							<strong>1/<?php echo $item["doctor_student"] ?></strong>
					</td>
				</tr>                        
                        <?php }} ?>
			
			
			<?php foreach($areas as $b => $item) { if($b != count($areas)-1) { ?>
				<tr>
					<?php if($b == 0) { ?><td rowspan="6">Tỉ lệ CB NHĐ/HS</td><?php } ?>
					<td><strong><?php echo $item["name"] ?></strong></td>
					
					<td align="right">
						
							1/<?php echo $item['old']["nondoctor_student"] ?>
					</td>                                        
                                        <td align="right">
						
							1/<?php echo $item["nondoctor_student"] ?>
					</td>
                                       
				</tr>
			<?php } else { ?>
                            <tr>
					<td><strong>Trung bình</strong></td>
					
					<td align="right">
						
							<strong>1/<?php echo $item['old']["nondoctor_student"] ?></strong>
					</td>
                                        
					<td align="right">
						
							<strong>1/<?php echo $item["nondoctor_student"] ?></strong>
					</td>
				</tr>                        
                        <?php }} ?>
		</tbody>
	</table>
	
	<h2 class="sepH_b">Thống kê tình hình nhân sự - quý <?php echo $c_quarter ?>/<?php echo $c_year ?></h2>
	
	<table cellspacing="0" cellpadding="0" border="0" class="table_a formEl_a smpl_tbl">
		<thead>
			<tr>
				<th rowspan="2" align="center" valign="middle"><?php __('Khu vực'); ?></th>
                                <th colspan="2" align="center"><?php __('Hệ điều trị'); ?></th>
                                <th colspan="5" align="center"><?php __('Hệ dự phòng'); ?></th>
			</tr>
			<tr>			
				<th align="center"><?php __('BS.RHM'); ?></th>
				<th align="center"><?php __('Tỉ lệ 1 BS/dân'); ?></th>
				<th align="center"><?php __('BS.RHM'); ?></th>
				<th align="center"><?php __('YS, ĐD, ...'); ?></th>
                                <th align="center"><?php __('Tổng'); ?></th>
                                <th align="center"><?php __('Tỉ lệ 1BS/HS'); ?></th>
                                <th align="center"><?php __('Tỉ lệ 1CB.RHM/HS'); ?></th>
			</tr>
		</thead>
		<tbody>
			<?php foreach($areas as $b => $item) { if($b != count($areas)-1) { ?>
				<tr>
					<td><strong><?php echo $item["name"] ?></strong></td>
					<td align="right">
						
							<?php echo $item["doctors"] ?>
					</td>
					<td align="right">
						
							<?php echo $item["doctor_population"] ?>
					</td>
                                        <td align="right">
						
							<?php echo $item["doctors_nhd"] ?>
					</td>
                                        <td align="right">
						
							<?php echo $item["nondoctors_nhd"] ?>
					</td>
                                        <td align="right">
						
							<?php echo $item["nhd_count_employee"] ?>
					</td>
                                        <td align="right">
						
							<?php echo $item["doctor_student"] ?>
					</td>
                                        <td align="right">
						
							<?php echo $item["nondoctor_student"] ?>
					</td>
                                       
				</tr>
			<?php } else { ?>
                            <tr>
					<td><strong><?php echo $item["name"] ?></strong></td>
					<td align="right">
						
							<strong><?php echo $item["doctors"] ?></strong>
					</td>
					<td align="right">
						
							<strong><?php echo $item["doctor_population"] ?></strong>
					</td>
                                        <td align="right">
						
							<strong><?php echo $item["doctors_nhd"] ?></strong>
					</td>
                                        <td align="right">
						
							<strong><?php echo $item["nondoctors_nhd"] ?></strong>
					</td>
                                        <td align="right">
						
							<strong><?php echo $item["nhd_count_employee"] ?></strong>
					</td>
                                        <td align="right">
						
							<strong><?php echo $item["doctor_student"] ?></strong>
					</td>
                                        <td align="right">
						
							<strong><?php echo $item["nondoctor_student"] ?></strong>
					</td>
                                       
				</tr>                        
                        <?php }} ?>		
		</tbody>
	</table>
        
        <ul>
            <li>Số lượng BS RHM công tác tại TP HCM ( <?php echo $tphcm["doctors"] ?> BS): <strong><?php echo $total["doctors"] ? round(($tphcm["doctors"]/$total["doctors"])*100, 2) :0 ; ?>%</strong></li>
            <li>Tỉ lệ BS/dân: <strong>1/<?php echo $total["doctor_population"] ?></strong></li>
	    <li>Tỉ lệ BS/dân cao nhất: <strong>1/<?php echo $maxmin['max']['doctors'] ? round($maxmin['max']['population']/$maxmin['max']['doctors'], 0) : 0; ?> (<?php echo $maxmin['max']['city']['City']['name'] ?>)</strong></li>
	    <li>Tỉ lệ BS/dân thất nhất: <strong>1/<?php echo $maxmin['min']['doctors'] ? round($maxmin['min']['population']/$maxmin['min']['doctors'], 0) : 0; ?> (<?php echo $maxmin['min']['city']['City']['name'] ?>)</strong></li>
        </ul>
	

<!--<div style="text-align: right">(Đơn vị: thiết bị)</div>-->
</div>